list_of_numbers = []
for number in range(3, 31):
    if number % 3 == 0:
        list_of_numbers.append(number)
print(list_of_numbers)
for list_index in range(len(list_of_numbers)):
    print(list_of_numbers[list_index])